<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="./lib/vue.js"></script>
    <style>
        *{
            padding:0;
            margin:0;
        }
        #root button{
            margin:5px;
            padding:5px;
        }
        #root button.active{
            background:red;
        }
        #root div{
            width:300px;
            height:100px;
            border:1px solid green;
        }
    </style>
</head>
<body>
    <div id="root">
        <button @click="activeIndex=0" :class="{active:activeIndex===0}">中国</button>
        <button @click="activeIndex=1" :class="{active:activeIndex===1}">日本</button>
        <button @click="activeIndex=2" :class="{active:activeIndex===2}">韩国</button>
        <div v-show="activeIndex===0">中国新闻</div>
        <div v-show="activeIndex===1">日本新闻</div>
        <div v-show="activeIndex===2">韩国新闻</div>
    </div>
</body>
<script>
    new Vue({
        el:"#root",
        data:{
			activeIndex:0
        }

    })
</script>
</html>